-- UNITDEF -- pawnlong_vi --
--------------------------------------------------------------------------------

local unitName = "pawnlong_vi"

--------------------------------------------------------------------------------

local unitDef = {
  acceleration       = 1.0,
  brakeRate          = 1.0,
  buildCostMetal     = 10,
  canAttack          = true,
  canMove            = true,
  canstop            = 1,
  category           = [[PAWN UNARMORED UNIT TARGET]],
  collisionvolumetest = 1,
  description        = [[Ranged Support Lv 6]],
  energyMake         = 0,
  energyStorage      = 0,
  explodeAs          = [[Death]],
  footprintX         = 2,
  footprintZ         = 2,
  iconType           = [[pawn]],
  idleAutoHeal       = 50,
  idleTime           = 300,
  levelGround        = false,
  maxDamage          = 911, --hp by 150%
  maxVelocity        = 2,
  metalMake          = 0,
  metalStorage       = 0,
  movementClass      = [[medium]],
  name               = [[Adv Daikyu Heavy Missile Launcher]],
  noChaseCategory    = [[NOTARGET AIR]],
  objectName         = [[pawnlong_v.s3o]],
  radarDistance      = 0,
  reclaimable        = false,
  seismicSignature   = 1,
  selfDestructAs     = [[Death]],
  selfDestructCountdown = 1,
  showNanoFrame      = false,
  sightDistance      = 800,
  smoothAnim         = false,
  turnRate           = 500,
  unitname           = [[pawnlong_vi]],
  upright            = true,
  sfxtypes = {
    explosiongenerators = {
[[custom:missileshot]],
[[custom:missileback]],
[[custom:burning]],
    },
  },
  -- sounds = {
    -- arrived = {
      -- [[commandgiven]],
    -- },
    -- ok = {
      -- [[commandgiven]],
    -- },
    -- select = {
      -- [[select]],
    -- },
  -- },
  weapons = {
       [1]  = {
      badTargetCategory  = [[NOTARGET]],
      def                = [[lviwep1]],
      onlyTargetCategory = [[TARGET]],
    },
  },
}


--------------------------------------------------------------------------------

local weaponDefs = {
  lviwep1 = {
	name = [[Large Missiles]], --need brackets or wont load unit
id                 = 6,
	rendertype = 1,
	lineofsight = 1,
	turret = 1,
	ballistic = 0,
	smoketrail = 1,
	smokedelay = .1,
	model = [[missile.s3o]],
	collideFriendly     =  false,
	accuracy = 3200,
	range = 550, -- 1933
	wobble = 1000,
	reloadtime = 3,
	areaofeffect = 120, -- previous long were 80 aoe
	weapontimer = 5,
	weaponvelocity = 450,
	startvelocity = 250,
	weaponacceleration = 220,
	turnrate = 1000, --counter wobble?
	metalpershot = 0,
    energypershot = 0,	
	soundstart = [[Rocket]],
	soundhit = [[medexplo]],
	soundTrigger = 1,
	firestarter = 70,
	guidance = 1,
	tracks = 1,
	selfprop = 1,
	TrajectoryHeight = 0.5,
	tolerance = 1000,
	explosiongenerator = [[custom:MISSILE_EXPLOSION]],
	impulsefactor = 0,
	impulseBoost = 0,
	craterMult = 0,
	craterBoost = 0,
	startsmoke = 1,
	InterceptedByShieldType = 2,

        damage = {
      default            = 303.8,  --303.75 rounded
    },
  },
  }
unitDef.weaponDefs = weaponDefs


--------------------------------------------------------------------------------

return lowerkeys({ [unitName] = unitDef })

--------------------------------------------------------------------------------
